<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>刮刮卡</title>
    <style>
        *{
            margin:0;
            padding:0;
        }
    </style>
</head>
<body>
    <div id="test" style="width:400px;height:200px"></div>
</body>
<script src="../dist/mrscratchcard.min.js"></script>
<script>
    mrscratchcard.create(document.querySelector('#test'),{
        text:'三等奖',
        valveRate:0.4, // 当擦除面积大于预设的这个比例的时候  会触发回调函数
        ok:function(){
            alert('擦除成功，超过预设面积比例了')
        },
        drawWidth:20,
        fontSize:40,
        erasingRemovesErasedObjects:true, // 擦除比例大于预设比例的时候 是否自动删除遮罩图层 默认是false
    })

</script>
</html>